Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: Get location of player spawn point on fly

  1. #21

    Default

    Like this:
    if(level.alliedslaughter >= level.slaughterhouse)
    {
    	wait .25
    	//stuffsrv !allies ftmelt // this is how i melt a whole team in rcon, stuffsrv didn't work though
    	//thread global/libmef/ft.scr::melt_player local.player.dmteam	// my rcon command uses "thread global/...melt_player self" so I thought maybe local.player.dmteam would be useful? it didn't work.
    	//thread global/libmef/ft.scr::reboot_allies // added a thread inside the ft.scr that uses the melt_player local.player thread, but it's team specific.. Didn't work
    
    
    	for(local.i = 1;local.i <= $player.size;local.i++)
    	{
    
    	local.player = $player[local.i]
    
    		if(local.player == NULL)
    		end
    
    		if(local.player.dmteam == "allies")
    		{
    
    		local.player respawn
    
    		}
    
    waitframe
    	}
    
    	level.alliedslaughter = 0
    	stuffsrv "say Allies have been thawed!"
    }

  2. #22
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    Quote Originally Posted by DoubleKill View Post
    Like this:
    if(level.alliedslaughter >= level.slaughterhouse)
    {
        wait .25
        //stuffsrv !allies ftmelt // this is how i melt a whole team in rcon, stuffsrv didn't work though
        //thread global/libmef/ft.scr::melt_player local.player.dmteam    // my rcon command uses "thread global/...melt_player self" so I thought maybe local.player.dmteam would be useful? it didn't work.
        //thread global/libmef/ft.scr::reboot_allies // added a thread inside the ft.scr that uses the melt_player local.player thread, but it's team specific.. Didn't work
    
    
        for(local.i = 1;local.i <= $player.size;local.i++)
        {
    
        local.player = $player[local.i]
    
            if(local.player == NULL)
            end
    
            if(local.player.dmteam == "allies")
            {
    
            local.player respawn
    
            }
    
    waitframe
        }
    
        level.alliedslaughter = 0
        stuffsrv "say Allies have been thawed!"
    }
    A more efficient way would be to gather all the allies in on array and respawn that array:

    if(level.alliedslaughter >= level.slaughterhouse)
    {
        wait .25
        //stuffsrv !allies ftmelt // this is how i melt a whole team in rcon, stuffsrv didn't work though
        //thread global/libmef/ft.scr::melt_player local.player.dmteam    // my rcon command uses "thread global/...melt_player self" so I thought maybe local.player.dmteam would be useful? it didn't work.
        //thread global/libmef/ft.scr::reboot_allies // added a thread inside the ft.scr that uses the melt_player local.player thread, but it's team specific.. Didn't work
    
    
        for(local.i = 1;local.i <= $player.size;local.i++)
        {
            if($player[local.i].dmteam == "allies")
                $team_allied[$team_allied.size] = $player[local.i]
        }
        $team_allied respawn
        level.alliedslaughter = 0
        stuffsrv "say Allies have been thawed!"
    }

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •